package priv.abadstring.study.haoke.dubbo.api;

import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import priv.abadstring.study.haoke.dubbo.entity.Ad;
import priv.abadstring.study.haoke.dubbo.service.AdService;
import priv.abadstring.study.haoke.dubbo.dto.PageInfo;

/**
 * AdServerImpl
 *
 * @author aBadString
 * @date 2021-06-18 18:47:16
 */
@Service(version = "1.0.0")
public class AdServerImpl implements AdServer {
    @Autowired
    private AdService adService;

    @Override
    public PageInfo<Ad> list(Integer type, Integer page, Integer pageSize) {
        Ad ad = new Ad();
        ad.setType(type);
        return this.adService.queryAdList(ad, page, pageSize);
    }
}
